package com.gy.common.exception;

public enum CommonExceptionType {
    NO_LOGIN(10001, "未登录"),
    NO_PERMISSION(10002, "没有权限"),
    PARAMETER_ERROR(10008, "参数错误"),

    SYS_ERROR(500, "系统错误"),

    INPUT_ERROR(5000, "系统错误"),


    USER_NAME_WRONG(10003, "用户名错误"),
    USER_PASSWORD_WRONG(10004, "密码错误"),
    USER_NONE_WRONG(10005, "用户不存在"),
    USER_NAME_BLANK(10006, "用户名不能为空"),
    USER_PASSWORD_BLANK(10007, "密码不能为空");
    private final Integer code;
    private String msg;

    CommonExceptionType(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return this.code;
    }

    public String getMsg() {
        return this.msg;
    }

    public CommonExceptionType setMsg(String msg) {
        this.msg = msg;
        return this;
    }
}
